<#assign staticUrl="${request.contextPath}">
<#macro detailText    descript textShow colspan="1" divId=""  cssStyle="">
                <td class="textLabel"><div class='descript' >${(descript)?if_exists}：</div>
                </td>
                <td class="textShow" colspan="${colspan?if_exists}">
                    <div id='${divId}' class='divshow ${cssStyle}'>${(textShow)?if_exists}</div>
                </td>
</#macro>  

<#macro inputText    descript name textShow colspan="1" cssStyle="">
                <td class="textLabel"><div class='descript' >${(descript)?if_exists}：</div>
                </td>
                <td class="textShow" colspan="${colspan?if_exists}">
                    <input type="text" class='divshow ${cssStyle}' id="${(name)?if_exists}" name="${(name)?if_exists}" value='${(textShow)?if_exists}' />
                </td>
</#macro>
<#macro inputPassword    descript name textShow colspan="1" cssStyle="">
                <td class="textLabel"><div class='descript' >${(descript)?if_exists}：</div>
                </td>
                <td class="textShow" colspan="${colspan?if_exists}">
                    <input type="password" class='divshow ${cssStyle}' id="${(name)?if_exists}" name="${(name)?if_exists}" value='${(textShow)?if_exists}' />
                </td>
</#macro>
<#macro dateText name value showsTime="false" singleClick="true" cssStyle="">
				<script src="${staticUrl}/js/calendar/calendar.js" type="text/javascript"></script>
				<input type="text" class=" ${cssStyle}" name="${name}" id="${name}" value="${((value)?if_exists)}">
				<script type="text/javascript" language="javascript1.2">
				<!--
			 		Calendar.setup({
						inputField     :    "${name}",  // 存放日期的域id
				        ifFormat       :    <#if showsTime=="true">"%Y-%m-%d %H:%M:%S"<#else>"%Y-%m-%d"</#if>,	//显示格式
						showsTime      :    ${showsTime},  // 是否显示时间
						singleClick    :    ${singleClick},  // 是否双击模式
						step           :    1      // show all years in drop-down boxes (instead of every other year as default)
					});
				-->
				</script>
</#macro>
<#-- checkbox输入域  数据库-->
<#macro checkboxDataSource name textValues checkedValues valueProperty="id" labelProperty="name">
				<#list textValues as domain>
					
					<#assign value=domain["${valueProperty}"]/>
					<#assign label=domain["${labelProperty}"]/>
					
					<#assign checked=false>
					<#if checkedValues?exists>
					<#list checkedValues as checkedValue>
						<#if checkedValue=value>
						<#assign checked = true>
						<#break>
						</#if>
					</#list>
					</#if>
					<input type="checkbox" name="${name}" value="${value}" <#if checked>checked</#if>/>
					<label for="checkedAuthorityIds-1" class="checkboxLabel">${label}</label>&nbsp;&nbsp;&nbsp;&nbsp;
				</#list>
</#macro>
<#-- radio 输入域 数据库 -->
<#macro radioDataSource name textValues checkedValue="" valueProperty="id" labelProperty="name">
				<#list textValues?keys as key>
					<#assign checked=false>
					<#if checkedValue?exists>
						<#if checkedValue=key>
						<#assign checked = true>
						</#if>
					</#if>
					
					<#assign value=domain["${valueProperty}"]/>
					<#assign label=domain["${labelProperty}"]/>
					
					<input type="radio" name="${name}" value="${key}" <#if checked>checked</#if>/>
					<label for="checkedAuthorityIds-1" class="checkboxLabel">${(textValues[key])?if_exists}</label>&nbsp;&nbsp;&nbsp;&nbsp;
				</#list>
</#macro>  
<#-- checkbox输入域 -->
<#macro checkbox name textValues checkedValues>
				<#list textValues?keys as key>
					<#assign checked=false>
					<#if checkedValues?exists>
					<#list checkedValues as value>
						<#if value=key>
						<#assign checked = true>
						</#if>
					</#list>
					</#if>
					<input type="checkbox" name="${name}" value="${key}" <#if checked>checked</#if>/>
					<label for="checkedAuthorityIds-1" class="checkboxLabel">${(textValues[key])?if_exists}</label>&nbsp;&nbsp;&nbsp;&nbsp;
				</#list>
</#macro>
<#-- radio输入域 -->
<#macro radio name textValues checkedValue>
				<#list textValues?keys as key>
					<#assign checked=false>
					<#if checkedValue?exists>
						<#if checkedValue?string = key?string>
						<#assign checked = true>
						</#if>
					</#if>
					<input type="radio" name="${name}" value="${key}" <#if checked>checked</#if>/>
					<label for="checkedAuthorityIds-1" class="checkboxLabel">${(textValues[key])?if_exists}</label>&nbsp;&nbsp;&nbsp;&nbsp;
				</#list>
</#macro>  


<#macro controlFck name textShow  height="400" readonly="false" colspan="1" >
<script type="text/javascript" src="${staticUrl}/common/fckeditor/fckeditor.js"></script>	
<td class="td_edit" height=${height}  <#if colspan!="1">colspan="${colspan}"</#if> >
<textarea name="${name}" id="${name}" style="display:none" >${((textShow)?if_exists)}</textarea>
<iframe frameborder="0" width="100%" height="${height}" scrolling="no" src="${staticUrl}/common/fckeditor/editor/fckeditor.html?InstanceName=${name}&amp;Toolbar=Default" id="${name}___Frame"> </iframe>
						</td>
</#macro>  
<#macro controlHtml attName textShow height="400" colspan="1" >
						<td class="textShow12" <#if colspan!="1">colspan="${colspan}"</#if>>
							<iframe   ID="iframeHTML"   MARGINHEIGHT="1"   MARGINWIDTH="1"   width="100%"   height="${height}"   scrolling="auto"></iframe>   
								<script type="text/javascript"   language="javascript1.2">
									var   iframeID=document.getElementById("iframeHTML").contentWindow; 
						<#--		注意：只能使用utf-8进行编码，然后用decodeURIComponent进行解码，否则显示不正确		-->
							        <#setting url_escaping_charset="UTF-8">
							        iframeID.document.write(decodeURIComponent("${textShow?url}"));
							        iframeID.focus();   
								</script>   
					</td>
</#macro>  